package  
{
	import flash.display.Sprite;
	/**
	 * ...
	 * @author patsup
	 * 
	 * 		The "plank" PirateLocation for holding PirateUnits to await being executed.
	 * 	See PirateLocation for most of the functionality.
	 * 		ReturnPirates() moves all pirates in this location back to the PirateLineup.
	 * 
	 * *** public functions
	 * Initialize():void
	 * ReturnPirates():void
	 * 
	 */
	public class PiratePlank extends PirateLocation
	{
		public function PiratePlank(xCoord:int, yCoord:int) 
		{
			x = xCoord;
			y = yCoord;
		}
		
		//Initialize()
		//Initializes the PiratePlank
		public function Initialize():void
		{
			RemovePirates();
		}
		
		//ReturnPirates()
		//Return all pirates from plank to lineup - update vector and display list
		public function ReturnPirates():void
		{
			while (pirates.length > 0) {
				PirateMove(pirates[0]);					//Move each one
			}
		}
	}

}